#ifndef _CONTAINER_CONCATENATION_H_
#define _CONTAINER_CONCATENATION_H_

#include "./stl_util_define.h"

namespace Container {

	using namespace std;
	using namespace Define;

	/*!
		operator for container concatenation and attribution. Every object is copied from the origin one to the destination one.
		\param destination container to receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		vector<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		vector<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 1 2 3 4 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline vector<Tipo>& operator *= ( vector<Tipo> &destination, const vector<Tipo> &origin ) {
			for( usint i = 0; i < origin.size(); ++i )
				destination, origin[i];
			return destination;
		};

	/*!
		operator for container attribution. Every object is copied from the origin one to the destination one.
		\param destination container to clear and then receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		vector<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		vector<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline vector<Tipo> operator * ( const vector<Tipo> &set1, const vector<Tipo> &set2 ) {
			vector<Tipo> result;
			return ( ( result *= set1 ) *= set2 );
		};

	/*!
		operator for container concatenation and attribution. Every object is copied from the origin one to the destination one.
		\param destination container to receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		vector<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		vector<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 1 2 3 4 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline vector<Tipo*>& operator *= ( vector<Tipo*> &destination, const vector<Tipo*> &origin ) {
			for( usint i = 0; i < origin.size(); ++i )
				destination, origin[i];
			return destination;
		};

	/*!
		operator for container attribution. Every object is copied from the origin one to the destination one.
		\param destination container to clear and then receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		vector<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		vector<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline vector<Tipo*> operator * ( const vector<Tipo*> &set1, const vector<Tipo*> &set2 ) {
			vector<Tipo*> result;
			return ( ( result *= set1 ) *= set2 );
		};

	/*!
		operator for container concatenation and attribution. Every object is copied from the origin one to the destination one.
		\param destination container to receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		deque<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		deque<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 1 2 3 4 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline deque<Tipo>& operator *= ( deque<Tipo> &destination, const deque<Tipo> &origin ) {
			for( usint i = 0; i < origin.size(); ++i )
				destination, origin[i];
			return destination;
		};

	/*!
		operator for container attribution. Every object is copied from the origin one to the destination one.
		\param destination container to clear and then receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		deque<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		deque<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline deque<Tipo> operator * ( const deque<Tipo> &set1, const deque<Tipo> &set2 ) {
			deque<Tipo> result;
			return ( ( result *= set1 ) *= set2 );
		};

	/*!
		operator for container concatenation and attribution. Every object is copied from the origin one to the destination one.
		\param destination container to receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		deque<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		deque<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 1 2 3 4 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline deque<Tipo*>& operator *= ( deque<Tipo*> &destination, const deque<Tipo*> &origin ) {
			for( usint i = 0; i < origin.size(); ++i )
				destination, origin[i];
			return destination;
		};

	/*!
		operator for container attribution. Every object is copied from the origin one to the destination one.
		\param destination container to clear and then receive objects
		\param origin container have his objects copied
		\return the destination container with his new objects
		\code
		deque<int*> dest;
		dest, new int(1), new int(2), new int(3), new int(4);
		deque<int*> set;
		set, new int(5), new int(6), new int(7), new int(8);
		cout * dest * endl; // prints [ 5 6 7 8 ]
		\endcode
	*/
	template <class Tipo>
		inline deque<Tipo*> operator * ( const deque<Tipo*> &set1, const deque<Tipo*> &set2 ) {
			deque<Tipo*> result;
			return ( ( result *= set1 ) *= set2 );
		};

};

#endif // _CONTAINER_CONCATENATION_H_
